#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int waysToSplitArray(int* nums, int numsSize)
{
    int n = numsSize;
    int cnt = 0;
    long long left = 0, right = 0;
    for (int i = 0; i < n; i++)
    {
        right += nums[i];
    }

    for (int i = 0; i < n - 1; i++)
    {
        left += nums[i];
        right -= nums[i];
        if (left >= right)
        {
            cnt++;
        }
    }
    return cnt;
}

int main()
{
    int arr[] = { 10, 4, -8, 7 };
    int cnt = waysToSplitArray(arr, 4);
    printf("%d\n", cnt);
	return 0;
}